It is known that e.g. frequency and voltage of the electric power transmitted in the grid may start oscillating due to disturbances or bad control coordination between different generation units. It is also known that such oscillations in the grid may be counteracted or damped by injecting electric power with the right phase relative to the grid oscillations. However, injection of such electric power may excite mechanical resonances in the power generator device which produces the damping electric power.
Accordingly, it is a problem that when a power generator is controlled to damp grid oscillations vibrations in the power generator may inadvertently be excited.